package com.gitee.wsl.struct.tree.action

import com.gitee.wsl.struct.tree.TreeElement

interface Action<T>

sealed interface TreeAction<T,E: TreeElement<T, E>>: Action<E> {

    class Addition<T,E: TreeElement<T, E>>(val node:E,val parent:E,val pos:Int): TreeAction<T,E>

    class Delete<T,E: TreeElement<T, E>>(val node:E): TreeAction<T,E>

    class Insert<T,E: TreeElement<T, E>>(val node:E,val parent:E,val pos:Int): TreeAction<T,E>

    class Move<T,E: TreeElement<T, E>>(val node:E,val parent:E,val pos:Int): TreeAction<T,E>

}